Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: link rendering and code highlights #219

Merged
merged 1 commit into from
Jun 18, 2024

Conversation

franciscoj
Copy link
Contributor

Hi thanks a lot for your work on exvcr! I was recently playing a bit with it and found some issues on the documentation, so I thought a PR would help you.

The readme has some links that are not rendering well on https://hexdocs.pm/exvcr, in addition some of the code examples use Elixir as language name, so the highlighting doesn't work.

I've changed the links so that they render well on hexdocs and rexpect the existing target="_blank".

I've also changed the language in the codeblocks so that it is correctly highlighted on both hexdocs and GitHub.

Note

I was only able to get the docs rendered on Elixir 1.14. I tried 1.15 and 1.16 too, but they didn't work and I was always getting an error like this:

❯ mix docs               
Generated exvcr app

13:46:12.122 [notice] Application makeup exited: exited in: Makeup.Application.start(:normal, [])
    ** (EXIT) an exception was raised:
        ** (UndefinedFunctionError) function Makeup.Application.start/2 is undefined (module Makeup.Application is not available)
            (makeup 1.1.2) Makeup.Application.start(:normal, [])
            (kernel 9.2.4) application_master.erl:293: :application_master.start_it_old/4

13:46:12.127 [notice] Application nimble_parsec exited: :stopped

13:46:12.127 [notice] Application earmark_parser exited: :stopped

13:46:12.127 [notice] Application eex exited: :stopped
** (MatchError) no match of right hand side value: {:error, {:makeup, {:bad_return, {{Makeup.Application, :start, [:normal, []]}, {:EXIT, {:undef, [{Makeup.Application, :start, [:normal, []], []}, {:applic
ation_master, :start_it_old, 4, [file: ~c"application_master.erl", line: 293]}]}}}}}}
    (ex_doc 0.34.0) lib/mix/tasks/docs.ex:336: Mix.Tasks.Docs.run/3
    (mix 1.15.8) lib/mix/task.ex:455: anonymous fn/3 in Mix.Task.run_task/5
    (mix 1.15.8) lib/mix/cli.ex:92: Mix.CLI.run_task/2
    /path_to/elixir/shims/mix:4: (file)

I imagined this might be an error on some of the rendering libraries used by ex_docs but I didn't want to have to upgrade them all.

Links

Before

Screenshot 2024-06-09 at 14 13 15

After

Screenshot 2024-06-09 at 14 14 16

Code blocks

Before

Screenshot 2024-06-09 at 14 14 47

After

Screenshot 2024-06-09 at 14 14 55

The readme has some links that are not rendering well on
https://hexdocs.pm/exvcr, in addition some of the code examples use
`Elixir` as language name, so the highlighting doesn't work.

I've changed the links so that they render well on hexdocs and rexpect
the existing `target="_blank"`.

I've also changed the language in the codeblocks so that it is correctly
highlighted on both hexdocs and GitHub.
@coveralls
Copy link

Coverage Status

coverage: 92.124%. remained the same
when pulling ad9494d on franciscoj:franciscoj/fix/docs
into f5f1e67 on parroty:master.

@parroty
Copy link
Owner

parroty commented Jun 18, 2024

Thanks!

@parroty parroty merged commit c9ac6df into parroty:master Jun 18, 2024
4 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants